<?php

use yii\grid\GridView;
use common\helpers\Html;
use common\helpers\Url;
use common\helpers\ImageHelper;
use common\models\bonus\Bonus;
use common\enums\BonusEnum;


$this->title = '拨比查看';
$this->params['breadcrumbs'][] = ['label' => $this->title];

?>

<div class="row">
    <div class="col-xs-12">
        <div class="box">
             <div class="box-header">
                <h3 class="box-title"><?= $this->title; ?></h3>
                <div class="box-tools">
                    
                </div>
            </div>
            <div class="box-body table-responsive">
                <div class="modal-body">
                    <div class="row">
                        <div class='col-sm-2 text-right'>总业绩:</div><div class='col-sm-10'><?= $bs['yeji']?></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>
                            总奖金:</div><div class='col-sm-10'><?= $bs['hj']?>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>总扣税:</div><div class='col-sm-10'><?= $bs['tax']?></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>总管理费:</div><div class='col-sm-10'><?= $bs['fee']?></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>
                            总实发:</div><div class='col-sm-10'><?= $bs['sf']?>
                            <?php foreach($bs['bs'] as $obj):?>
                                &nbsp;<?= $obj['name'].':<span class="text-danger">' . $obj['amount'] . '</span>(<span class="text-success">'.$obj['bl'].'%</span>);'?>
                            <?php endforeach;?>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>拨比:</div><div class='col-sm-10'><?= $bs['yeji'] > 0 ? intval($bs['sf'] / $bs['yeji'] * 10000) / 100 : '-';?>%</div>
                    </div>
                </div>
            </div>

            <div class="box-body table-responsive">
                <div class="modal-body">
                    <div class="row">
                        <div class='col-sm-2 text-right'>复消总业绩:</div><div class='col-sm-10'><?= $fx['yeji']?></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>
                            复消总奖金:</div><div class='col-sm-10'><?= $fx['hj']?>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>复消总扣税:</div><div class='col-sm-10'><?= $fx['tax']?></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>复消总管理费:</div><div class='col-sm-10'><?= $fx['fee']?></div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>
                            复消总实发:</div><div class='col-sm-10'><?= $fx['sf']?>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class='col-sm-2 text-right'>复消拨比:</div><div class='col-sm-10'><?= $fx['yeji'] > 0 ? intval($fx['sf'] / $fx['yeji'] * 10000) / 100 : '-';?>%</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>